/**
 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.hellodoctor.slayer.service.persistence;

import com.hellodoctor.slayer.model.Appointment;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.ReferenceRegistry;
import com.liferay.portal.service.ServiceContext;

import java.util.List;

/**
 * The persistence utility for the appointment service. This utility wraps {@link AppointmentPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author Shahbaj
 * @see AppointmentPersistence
 * @see AppointmentPersistenceImpl
 * @generated
 */
public class AppointmentUtil {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
	 */

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
	 */
	public static void clearCache() {
		getPersistence().clearCache();
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
	 */
	public static void clearCache(Appointment appointment) {
		getPersistence().clearCache(appointment);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
	 */
	public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
		throws SystemException {
		return getPersistence().countWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
	 */
	public static List<Appointment> findWithDynamicQuery(
		DynamicQuery dynamicQuery) throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
	 */
	public static List<Appointment> findWithDynamicQuery(
		DynamicQuery dynamicQuery, int start, int end)
		throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
	 */
	public static List<Appointment> findWithDynamicQuery(
		DynamicQuery dynamicQuery, int start, int end,
		OrderByComparator orderByComparator) throws SystemException {
		return getPersistence()
				   .findWithDynamicQuery(dynamicQuery, start, end,
			orderByComparator);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
	 */
	public static Appointment update(Appointment appointment)
		throws SystemException {
		return getPersistence().update(appointment);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
	 */
	public static Appointment update(Appointment appointment,
		ServiceContext serviceContext) throws SystemException {
		return getPersistence().update(appointment, serviceContext);
	}

	/**
	* Returns all the appointments where doctorId = &#63;.
	*
	* @param doctorId the doctor ID
	* @return the matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findByDoctorId(
		long doctorId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByDoctorId(doctorId);
	}

	/**
	* Returns a range of all the appointments where doctorId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.hellodoctor.slayer.model.impl.AppointmentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
	* </p>
	*
	* @param doctorId the doctor ID
	* @param start the lower bound of the range of appointments
	* @param end the upper bound of the range of appointments (not inclusive)
	* @return the range of matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findByDoctorId(
		long doctorId, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByDoctorId(doctorId, start, end);
	}

	/**
	* Returns an ordered range of all the appointments where doctorId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.hellodoctor.slayer.model.impl.AppointmentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
	* </p>
	*
	* @param doctorId the doctor ID
	* @param start the lower bound of the range of appointments
	* @param end the upper bound of the range of appointments (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findByDoctorId(
		long doctorId, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByDoctorId(doctorId, start, end, orderByComparator);
	}

	/**
	* Returns the first appointment in the ordered set where doctorId = &#63;.
	*
	* @param doctorId the doctor ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching appointment
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment findByDoctorId_First(
		long doctorId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByDoctorId_First(doctorId, orderByComparator);
	}

	/**
	* Returns the first appointment in the ordered set where doctorId = &#63;.
	*
	* @param doctorId the doctor ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching appointment, or <code>null</code> if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment fetchByDoctorId_First(
		long doctorId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByDoctorId_First(doctorId, orderByComparator);
	}

	/**
	* Returns the last appointment in the ordered set where doctorId = &#63;.
	*
	* @param doctorId the doctor ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching appointment
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment findByDoctorId_Last(
		long doctorId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByDoctorId_Last(doctorId, orderByComparator);
	}

	/**
	* Returns the last appointment in the ordered set where doctorId = &#63;.
	*
	* @param doctorId the doctor ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching appointment, or <code>null</code> if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment fetchByDoctorId_Last(
		long doctorId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByDoctorId_Last(doctorId, orderByComparator);
	}

	/**
	* Returns the appointments before and after the current appointment in the ordered set where doctorId = &#63;.
	*
	* @param appointmentId the primary key of the current appointment
	* @param doctorId the doctor ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next appointment
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a appointment with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment[] findByDoctorId_PrevAndNext(
		long appointmentId, long doctorId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByDoctorId_PrevAndNext(appointmentId, doctorId,
			orderByComparator);
	}

	/**
	* Removes all the appointments where doctorId = &#63; from the database.
	*
	* @param doctorId the doctor ID
	* @throws SystemException if a system exception occurred
	*/
	public static void removeByDoctorId(long doctorId)
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeByDoctorId(doctorId);
	}

	/**
	* Returns the number of appointments where doctorId = &#63;.
	*
	* @param doctorId the doctor ID
	* @return the number of matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static int countByDoctorId(long doctorId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByDoctorId(doctorId);
	}

	/**
	* Returns all the appointments where patientId = &#63;.
	*
	* @param patientId the patient ID
	* @return the matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findByPatientId(
		long patientId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByPatientId(patientId);
	}

	/**
	* Returns a range of all the appointments where patientId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.hellodoctor.slayer.model.impl.AppointmentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
	* </p>
	*
	* @param patientId the patient ID
	* @param start the lower bound of the range of appointments
	* @param end the upper bound of the range of appointments (not inclusive)
	* @return the range of matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findByPatientId(
		long patientId, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByPatientId(patientId, start, end);
	}

	/**
	* Returns an ordered range of all the appointments where patientId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.hellodoctor.slayer.model.impl.AppointmentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
	* </p>
	*
	* @param patientId the patient ID
	* @param start the lower bound of the range of appointments
	* @param end the upper bound of the range of appointments (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findByPatientId(
		long patientId, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByPatientId(patientId, start, end, orderByComparator);
	}

	/**
	* Returns the first appointment in the ordered set where patientId = &#63;.
	*
	* @param patientId the patient ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching appointment
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment findByPatientId_First(
		long patientId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByPatientId_First(patientId, orderByComparator);
	}

	/**
	* Returns the first appointment in the ordered set where patientId = &#63;.
	*
	* @param patientId the patient ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching appointment, or <code>null</code> if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment fetchByPatientId_First(
		long patientId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByPatientId_First(patientId, orderByComparator);
	}

	/**
	* Returns the last appointment in the ordered set where patientId = &#63;.
	*
	* @param patientId the patient ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching appointment
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment findByPatientId_Last(
		long patientId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByPatientId_Last(patientId, orderByComparator);
	}

	/**
	* Returns the last appointment in the ordered set where patientId = &#63;.
	*
	* @param patientId the patient ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching appointment, or <code>null</code> if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment fetchByPatientId_Last(
		long patientId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByPatientId_Last(patientId, orderByComparator);
	}

	/**
	* Returns the appointments before and after the current appointment in the ordered set where patientId = &#63;.
	*
	* @param appointmentId the primary key of the current appointment
	* @param patientId the patient ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next appointment
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a appointment with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment[] findByPatientId_PrevAndNext(
		long appointmentId, long patientId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByPatientId_PrevAndNext(appointmentId, patientId,
			orderByComparator);
	}

	/**
	* Removes all the appointments where patientId = &#63; from the database.
	*
	* @param patientId the patient ID
	* @throws SystemException if a system exception occurred
	*/
	public static void removeByPatientId(long patientId)
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeByPatientId(patientId);
	}

	/**
	* Returns the number of appointments where patientId = &#63;.
	*
	* @param patientId the patient ID
	* @return the number of matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static int countByPatientId(long patientId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByPatientId(patientId);
	}

	/**
	* Returns all the appointments where patientId = &#63; and doctorId = &#63;.
	*
	* @param patientId the patient ID
	* @param doctorId the doctor ID
	* @return the matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findByPatientId_DoctorId(
		long patientId, long doctorId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByPatientId_DoctorId(patientId, doctorId);
	}

	/**
	* Returns a range of all the appointments where patientId = &#63; and doctorId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.hellodoctor.slayer.model.impl.AppointmentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
	* </p>
	*
	* @param patientId the patient ID
	* @param doctorId the doctor ID
	* @param start the lower bound of the range of appointments
	* @param end the upper bound of the range of appointments (not inclusive)
	* @return the range of matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findByPatientId_DoctorId(
		long patientId, long doctorId, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByPatientId_DoctorId(patientId, doctorId, start, end);
	}

	/**
	* Returns an ordered range of all the appointments where patientId = &#63; and doctorId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.hellodoctor.slayer.model.impl.AppointmentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
	* </p>
	*
	* @param patientId the patient ID
	* @param doctorId the doctor ID
	* @param start the lower bound of the range of appointments
	* @param end the upper bound of the range of appointments (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findByPatientId_DoctorId(
		long patientId, long doctorId, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByPatientId_DoctorId(patientId, doctorId, start, end,
			orderByComparator);
	}

	/**
	* Returns the first appointment in the ordered set where patientId = &#63; and doctorId = &#63;.
	*
	* @param patientId the patient ID
	* @param doctorId the doctor ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching appointment
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment findByPatientId_DoctorId_First(
		long patientId, long doctorId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByPatientId_DoctorId_First(patientId, doctorId,
			orderByComparator);
	}

	/**
	* Returns the first appointment in the ordered set where patientId = &#63; and doctorId = &#63;.
	*
	* @param patientId the patient ID
	* @param doctorId the doctor ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching appointment, or <code>null</code> if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment fetchByPatientId_DoctorId_First(
		long patientId, long doctorId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByPatientId_DoctorId_First(patientId, doctorId,
			orderByComparator);
	}

	/**
	* Returns the last appointment in the ordered set where patientId = &#63; and doctorId = &#63;.
	*
	* @param patientId the patient ID
	* @param doctorId the doctor ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching appointment
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment findByPatientId_DoctorId_Last(
		long patientId, long doctorId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByPatientId_DoctorId_Last(patientId, doctorId,
			orderByComparator);
	}

	/**
	* Returns the last appointment in the ordered set where patientId = &#63; and doctorId = &#63;.
	*
	* @param patientId the patient ID
	* @param doctorId the doctor ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching appointment, or <code>null</code> if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment fetchByPatientId_DoctorId_Last(
		long patientId, long doctorId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByPatientId_DoctorId_Last(patientId, doctorId,
			orderByComparator);
	}

	/**
	* Returns the appointments before and after the current appointment in the ordered set where patientId = &#63; and doctorId = &#63;.
	*
	* @param appointmentId the primary key of the current appointment
	* @param patientId the patient ID
	* @param doctorId the doctor ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next appointment
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a appointment with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment[] findByPatientId_DoctorId_PrevAndNext(
		long appointmentId, long patientId, long doctorId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByPatientId_DoctorId_PrevAndNext(appointmentId,
			patientId, doctorId, orderByComparator);
	}

	/**
	* Removes all the appointments where patientId = &#63; and doctorId = &#63; from the database.
	*
	* @param patientId the patient ID
	* @param doctorId the doctor ID
	* @throws SystemException if a system exception occurred
	*/
	public static void removeByPatientId_DoctorId(long patientId, long doctorId)
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeByPatientId_DoctorId(patientId, doctorId);
	}

	/**
	* Returns the number of appointments where patientId = &#63; and doctorId = &#63;.
	*
	* @param patientId the patient ID
	* @param doctorId the doctor ID
	* @return the number of matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static int countByPatientId_DoctorId(long patientId, long doctorId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByPatientId_DoctorId(patientId, doctorId);
	}

	/**
	* Returns all the appointments where doctorId = &#63; and appointmentDate = &#63;.
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @return the matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findByDoctorId_ADate(
		long doctorId, java.util.Date appointmentDate)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByDoctorId_ADate(doctorId, appointmentDate);
	}

	/**
	* Returns a range of all the appointments where doctorId = &#63; and appointmentDate = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.hellodoctor.slayer.model.impl.AppointmentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
	* </p>
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param start the lower bound of the range of appointments
	* @param end the upper bound of the range of appointments (not inclusive)
	* @return the range of matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findByDoctorId_ADate(
		long doctorId, java.util.Date appointmentDate, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByDoctorId_ADate(doctorId, appointmentDate, start, end);
	}

	/**
	* Returns an ordered range of all the appointments where doctorId = &#63; and appointmentDate = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.hellodoctor.slayer.model.impl.AppointmentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
	* </p>
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param start the lower bound of the range of appointments
	* @param end the upper bound of the range of appointments (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findByDoctorId_ADate(
		long doctorId, java.util.Date appointmentDate, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByDoctorId_ADate(doctorId, appointmentDate, start, end,
			orderByComparator);
	}

	/**
	* Returns the first appointment in the ordered set where doctorId = &#63; and appointmentDate = &#63;.
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching appointment
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment findByDoctorId_ADate_First(
		long doctorId, java.util.Date appointmentDate,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByDoctorId_ADate_First(doctorId, appointmentDate,
			orderByComparator);
	}

	/**
	* Returns the first appointment in the ordered set where doctorId = &#63; and appointmentDate = &#63;.
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching appointment, or <code>null</code> if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment fetchByDoctorId_ADate_First(
		long doctorId, java.util.Date appointmentDate,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByDoctorId_ADate_First(doctorId, appointmentDate,
			orderByComparator);
	}

	/**
	* Returns the last appointment in the ordered set where doctorId = &#63; and appointmentDate = &#63;.
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching appointment
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment findByDoctorId_ADate_Last(
		long doctorId, java.util.Date appointmentDate,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByDoctorId_ADate_Last(doctorId, appointmentDate,
			orderByComparator);
	}

	/**
	* Returns the last appointment in the ordered set where doctorId = &#63; and appointmentDate = &#63;.
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching appointment, or <code>null</code> if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment fetchByDoctorId_ADate_Last(
		long doctorId, java.util.Date appointmentDate,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByDoctorId_ADate_Last(doctorId, appointmentDate,
			orderByComparator);
	}

	/**
	* Returns the appointments before and after the current appointment in the ordered set where doctorId = &#63; and appointmentDate = &#63;.
	*
	* @param appointmentId the primary key of the current appointment
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next appointment
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a appointment with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment[] findByDoctorId_ADate_PrevAndNext(
		long appointmentId, long doctorId, java.util.Date appointmentDate,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByDoctorId_ADate_PrevAndNext(appointmentId, doctorId,
			appointmentDate, orderByComparator);
	}

	/**
	* Removes all the appointments where doctorId = &#63; and appointmentDate = &#63; from the database.
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @throws SystemException if a system exception occurred
	*/
	public static void removeByDoctorId_ADate(long doctorId,
		java.util.Date appointmentDate)
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeByDoctorId_ADate(doctorId, appointmentDate);
	}

	/**
	* Returns the number of appointments where doctorId = &#63; and appointmentDate = &#63;.
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @return the number of matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static int countByDoctorId_ADate(long doctorId,
		java.util.Date appointmentDate)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByDoctorId_ADate(doctorId, appointmentDate);
	}

	/**
	* Returns all the appointments where doctorId = &#63; and appointmentDate = &#63; and status = &#63;.
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param status the status
	* @return the matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findByDoctorId_ADate_status(
		long doctorId, java.util.Date appointmentDate, int status)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByDoctorId_ADate_status(doctorId, appointmentDate,
			status);
	}

	/**
	* Returns a range of all the appointments where doctorId = &#63; and appointmentDate = &#63; and status = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.hellodoctor.slayer.model.impl.AppointmentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
	* </p>
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param status the status
	* @param start the lower bound of the range of appointments
	* @param end the upper bound of the range of appointments (not inclusive)
	* @return the range of matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findByDoctorId_ADate_status(
		long doctorId, java.util.Date appointmentDate, int status, int start,
		int end) throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByDoctorId_ADate_status(doctorId, appointmentDate,
			status, start, end);
	}

	/**
	* Returns an ordered range of all the appointments where doctorId = &#63; and appointmentDate = &#63; and status = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.hellodoctor.slayer.model.impl.AppointmentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
	* </p>
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param status the status
	* @param start the lower bound of the range of appointments
	* @param end the upper bound of the range of appointments (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findByDoctorId_ADate_status(
		long doctorId, java.util.Date appointmentDate, int status, int start,
		int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByDoctorId_ADate_status(doctorId, appointmentDate,
			status, start, end, orderByComparator);
	}

	/**
	* Returns the first appointment in the ordered set where doctorId = &#63; and appointmentDate = &#63; and status = &#63;.
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param status the status
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching appointment
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment findByDoctorId_ADate_status_First(
		long doctorId, java.util.Date appointmentDate, int status,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByDoctorId_ADate_status_First(doctorId,
			appointmentDate, status, orderByComparator);
	}

	/**
	* Returns the first appointment in the ordered set where doctorId = &#63; and appointmentDate = &#63; and status = &#63;.
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param status the status
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching appointment, or <code>null</code> if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment fetchByDoctorId_ADate_status_First(
		long doctorId, java.util.Date appointmentDate, int status,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByDoctorId_ADate_status_First(doctorId,
			appointmentDate, status, orderByComparator);
	}

	/**
	* Returns the last appointment in the ordered set where doctorId = &#63; and appointmentDate = &#63; and status = &#63;.
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param status the status
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching appointment
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment findByDoctorId_ADate_status_Last(
		long doctorId, java.util.Date appointmentDate, int status,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByDoctorId_ADate_status_Last(doctorId, appointmentDate,
			status, orderByComparator);
	}

	/**
	* Returns the last appointment in the ordered set where doctorId = &#63; and appointmentDate = &#63; and status = &#63;.
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param status the status
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching appointment, or <code>null</code> if a matching appointment could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment fetchByDoctorId_ADate_status_Last(
		long doctorId, java.util.Date appointmentDate, int status,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByDoctorId_ADate_status_Last(doctorId,
			appointmentDate, status, orderByComparator);
	}

	/**
	* Returns the appointments before and after the current appointment in the ordered set where doctorId = &#63; and appointmentDate = &#63; and status = &#63;.
	*
	* @param appointmentId the primary key of the current appointment
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param status the status
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next appointment
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a appointment with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment[] findByDoctorId_ADate_status_PrevAndNext(
		long appointmentId, long doctorId, java.util.Date appointmentDate,
		int status,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByDoctorId_ADate_status_PrevAndNext(appointmentId,
			doctorId, appointmentDate, status, orderByComparator);
	}

	/**
	* Removes all the appointments where doctorId = &#63; and appointmentDate = &#63; and status = &#63; from the database.
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param status the status
	* @throws SystemException if a system exception occurred
	*/
	public static void removeByDoctorId_ADate_status(long doctorId,
		java.util.Date appointmentDate, int status)
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence()
			.removeByDoctorId_ADate_status(doctorId, appointmentDate, status);
	}

	/**
	* Returns the number of appointments where doctorId = &#63; and appointmentDate = &#63; and status = &#63;.
	*
	* @param doctorId the doctor ID
	* @param appointmentDate the appointment date
	* @param status the status
	* @return the number of matching appointments
	* @throws SystemException if a system exception occurred
	*/
	public static int countByDoctorId_ADate_status(long doctorId,
		java.util.Date appointmentDate, int status)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .countByDoctorId_ADate_status(doctorId, appointmentDate,
			status);
	}

	/**
	* Caches the appointment in the entity cache if it is enabled.
	*
	* @param appointment the appointment
	*/
	public static void cacheResult(
		com.hellodoctor.slayer.model.Appointment appointment) {
		getPersistence().cacheResult(appointment);
	}

	/**
	* Caches the appointments in the entity cache if it is enabled.
	*
	* @param appointments the appointments
	*/
	public static void cacheResult(
		java.util.List<com.hellodoctor.slayer.model.Appointment> appointments) {
		getPersistence().cacheResult(appointments);
	}

	/**
	* Creates a new appointment with the primary key. Does not add the appointment to the database.
	*
	* @param appointmentId the primary key for the new appointment
	* @return the new appointment
	*/
	public static com.hellodoctor.slayer.model.Appointment create(
		long appointmentId) {
		return getPersistence().create(appointmentId);
	}

	/**
	* Removes the appointment with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param appointmentId the primary key of the appointment
	* @return the appointment that was removed
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a appointment with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment remove(
		long appointmentId)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().remove(appointmentId);
	}

	public static com.hellodoctor.slayer.model.Appointment updateImpl(
		com.hellodoctor.slayer.model.Appointment appointment)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().updateImpl(appointment);
	}

	/**
	* Returns the appointment with the primary key or throws a {@link com.hellodoctor.slayer.NoSuchAppointmentException} if it could not be found.
	*
	* @param appointmentId the primary key of the appointment
	* @return the appointment
	* @throws com.hellodoctor.slayer.NoSuchAppointmentException if a appointment with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment findByPrimaryKey(
		long appointmentId)
		throws com.hellodoctor.slayer.NoSuchAppointmentException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByPrimaryKey(appointmentId);
	}

	/**
	* Returns the appointment with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param appointmentId the primary key of the appointment
	* @return the appointment, or <code>null</code> if a appointment with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hellodoctor.slayer.model.Appointment fetchByPrimaryKey(
		long appointmentId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByPrimaryKey(appointmentId);
	}

	/**
	* Returns all the appointments.
	*
	* @return the appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll();
	}

	/**
	* Returns a range of all the appointments.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.hellodoctor.slayer.model.impl.AppointmentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
	* </p>
	*
	* @param start the lower bound of the range of appointments
	* @param end the upper bound of the range of appointments (not inclusive)
	* @return the range of appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findAll(
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end);
	}

	/**
	* Returns an ordered range of all the appointments.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.hellodoctor.slayer.model.impl.AppointmentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
	* </p>
	*
	* @param start the lower bound of the range of appointments
	* @param end the upper bound of the range of appointments (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of appointments
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hellodoctor.slayer.model.Appointment> findAll(
		int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end, orderByComparator);
	}

	/**
	* Removes all the appointments from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public static void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeAll();
	}

	/**
	* Returns the number of appointments.
	*
	* @return the number of appointments
	* @throws SystemException if a system exception occurred
	*/
	public static int countAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countAll();
	}

	public static AppointmentPersistence getPersistence() {
		if (_persistence == null) {
			_persistence = (AppointmentPersistence)PortletBeanLocatorUtil.locate(com.hellodoctor.slayer.service.ClpSerializer.getServletContextName(),
					AppointmentPersistence.class.getName());

			ReferenceRegistry.registerReference(AppointmentUtil.class,
				"_persistence");
		}

		return _persistence;
	}

	/**
	 * @deprecated As of 6.2.0
	 */
	public void setPersistence(AppointmentPersistence persistence) {
	}

	private static AppointmentPersistence _persistence;
}